package 设计模式.创建型.单例;

/**
 * @author lchenglong
 * @date 2024/1/26
 */
public class Singleton3 {
    private static volatile Singleton3 instance;

    public static Singleton3 getInstance(){
        if (instance == null){
            synchronized (Singleton3.class){
                if (instance == null){
                    instance = new Singleton3();
                }
            }
        }
        return instance;
    }
}
